#ifndef TABLE_STATE_H_
#define TABLE_STATE_H_
#include "table.h"

namespace Tetris{

class Table_State{
private:
	Table* p_data;
	Shape* p_shape;
	int left;
	int top;
	bool initialShapeValid;
public:
	Table_State(Table* p_d,Shape* p_s);
	bool CanGenerateShape() const;
	bool MoveLeft();
	bool MoveRight();
	bool MoveDown();
	bool MoveBottom();
	bool Transform();
	bool ShapeCanTransform() const;
	bool ShpeValid() const;
	int UpdateTable();
	const Table* GetTable() const;
	const Shape* GetShape() const;
private:
	void setShapeToTable(unsigned char val);
};

}
#endif
